package com.mx.tool.commit;

/**
 * @Author: mengxiang.
 * @create: 2021-03-08 10:06
 * @Description:
 */
public enum Type {

    FEAT("Features", "功能增加或变更"),
    FIX("Bug Fixes", "bug修复"),
    DOCS("Documentation", "更新了文档或注释"),
    STYLE("Styles", " 代码格式调整"),
    REFACTOR("Code Refactoring", "重构代码。指的是代码结构的调整，比如使用了一些设计模式重新组织了代码"),
    PERF("Performance Improvements", "A code change that improves performance"),
    TEST("Tests", "增加了单元测试和自动化相关的代码");

    public final String title;
    public final String description;

    Type(String title, String description) {
        this.title = title;
        this.description = description;
    }

    public String label() {
        return this.name().toLowerCase();
    }

    @Override
    public String toString() {
        return String.format("%s - %s", this.label(), this.description);
    }
}
